package com.itheima.admin.controller;

import com.itheima.admin.service.AdUserService;
import com.itheima.common.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/login")
public class LoginController {
    @Autowired
    private AdUserService adUserService;

   @PostMapping("/in")
    public ResultVo<Map<String,Object>> login(@RequestBody Map<String,String> params){
       Map<String,Object> map = adUserService.loginCheck(params);
       return ResultVo.ok(map);
   }


}
